package com.zte.shopping.service;

import com.zte.shopping.entity.Dept;
import com.zte.shopping.exception.DeptExistException;
import com.zte.shopping.exception.LoginDisabledException;
import com.zte.shopping.exception.RequestParameterException;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface DeptService {
    /**
     * @Author zuti
     * @Description //TODO 查询部门列表
     * @Date 17:54 2020/6/28
     * @Param [pageIndex]
     * @return java.util.List<com.zte.shopping.entity.Dept>
     **/
    List<Dept> deptList(Integer pageIndex);

    /**
     * @Author zuti
     * @Description //TODO 查询部门数量
     * @Date 17:54 2020/6/28
     * @Param []
     * @return int
     **/
    int deptListCount();

    /**
     * @Author zuti
     * @Description //TODO 添加部门
     * @Date 15:22 2020/6/30
     * @Param [deptName, remark, session]
     * @return void
     **/
    void addFatherDept(String deptName, String remark, HttpSession session) throws DeptExistException, LoginDisabledException;

    /**
     * @Author zuti
     * @Description //TODO 添加子部门
     * @Date 15:23 2020/6/30
     * @Param [fatherDeptId, deptName, remark, session]
     * @return void
     **/

    void addSonDept(String fatherDeptId, String deptName, String remark, HttpSession session) throws DeptExistException, LoginDisabledException;

    /**
     * @Author zuti
     * @Description //TODO 修改部门
     * @Date 15:23 2020/6/30
     * @Param [deptId, deptName, remark]
     * @return void
     **/

    void modifyDept(String deptId, String deptName, String remark) throws DeptExistException;

    /**
     * @Author zuti
     * @Description //TODO 修改部门状态
     * @Date 15:23 2020/6/30
     * @Param [deptId, isValid]
     * @return void
     **/

    void modifyStatus(String deptId, String isValid) throws RequestParameterException;

    /**
     * @Author zuti
     * @Description //TODO 查找部门通过Id
     * @Date 15:28 2020/6/30
     * @Param [id]
     * @return com.zte.shopping.entity.Dept
     **/

    Dept findById(String id) throws RequestParameterException;
}
